package sjd.socket;
import java.io.*;
import java.net.*;
public class MySocket extends Socket 
{
	private BufferedReader br;
	private PrintWriter pw;
	private Socket socket=null;
	private MySocket mysocket=null;
	public MySocket(Socket socket)throws IOException 
	{	
		this.socket=socket;
		br=new BufferedReader(new InputStreamReader(socket.getInputStream()));
		pw=new PrintWriter(socket.getOutputStream());
	}
	
	public void send(String message)
	{
		pw.println(message);
		pw.flush();
	}
	
	public String receive()throws IOException
	{
		String tmp=br.readLine();
		return tmp;
	}
	
	public Socket getSocket()
	{
		return socket;
	}
	
	public void close()throws IOException
	{
		socket.close();
	}
}
